3f46c0b7fdef7e8573813e0dfd6ddac7c150fb92,core/baseLanguage/baseLanguage/source_gen/jetbrains/mps/baseLanguage/javastub/ClassifierUpdater.java,ClassifierUpdater,updateTypeVariables,#ASMMethod#SNode#SNode#,120
Before Change
private void updateTypeVariables(ASMMethod method, SNode result, SNode cls) {
Map<ASMTypeVariable, SNode> typeVars = MapSequence.fromMap(new HashMap<ASMTypeVariable, SNode>());
for (ASMTypeVariable tv : method.getTypeParameters()) {
SNode tvd = new ClassifierUpdater.QuotationClass_ol94f8_a0a0a1a2().createNode(tv.getName());
ListSequence.fromList(SLinkOperations.getTargets(result, "typeVariableDeclaration", true)).addElement(tvd);
MapSequence.fromMap(typeVars).put(tv, tvd);
}
for (ASMTypeVariable tv : method.getTypeParameters()) {
SNode tvd = MapSequence.fromMap(typeVars).get(tv);
if (tv instanceof ASMFormalTypeParameter) {
ASMFormalTypeParameter tp = (ASMFormalTypeParameter) tv;
if (tp.getClassBound() != null) {
SLinkOperations.setTarget(tvd, "bound", getTypeByASMType(tp.getClassBound(), result, cls), true);
}
for (ASMType act : tp.getInterfaceBounds()) {
ListSequence.fromList(SLinkOperations.getTargets(tvd, "auxBounds", true)).addElement(SNodeOperations.cast(getTypeByASMType(act, result, cls), "jetbrains.mps.baseLanguage.structure.ClassifierType"));
After Change
}
}
private void updateTypeVariables(ASMClass cls, SModel model, Classifier result) {
for (ASMTypeVariable tv : cls.getTypeParameters()) {
TypeVariableDeclaration typeVariableDeclaration = TypeVariableDeclaration.newInstance(model);
typeVariableDeclaration.setName(tv.getName());
result.addTypeVariableDeclaration(typeVariableDeclaration);
if (tv instanceof ASMFormalTypeParameter) {
ASMFormalTypeParameter tp = (ASMFormalTypeParameter) tv;
if (tp.getClassBound() != null) {
typeVariableDeclaration.setBound(getTypeByASMType(tp.getClassBound(), null, result, model));
}
for (ASMType act : tp.getInterfaceBounds()) {
typeVariableDeclaration.addAuxBounds((ClassifierType) getTypeByASMType(act, null, result, model));